//
//  PriceResultViewController.m
//  EMMApp
//
//  Created by Mac on 16/7/1.
//  Copyright © 2016年 YiXun. All rights reserved.
//

#import "PriceResultViewController.h"
#import "MarketingCell.h"
#import "PriceResultCell.h"
#import "ShotImage.h"
#import "NSString+Base64.h"
#import "NSData+Base64.h"
#import "LendingRateOneCell.h"

#define Screen_Width [UIScreen mainScreen].bounds.size.width
#define Screen_Height [UIScreen mainScreen].bounds.size.height

@interface PriceResultViewController ()<UIScrollViewDelegate> {
    UIImage *shotImage;
    NSInteger oneHgaodu;
}

@property (nonatomic, strong) UIView *priceResultView;

@property (nonatomic, strong) UIView *myView;

@property (nonatomic, strong) UIView *titleView;

@property (nonatomic, strong) UIScrollView *myScrollView;

@property (assign, nonatomic) BOOL result;

@end

@implementation PriceResultViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self creatNavigationController];
    self.view.backgroundColor = [UIColor whiteColor];
    _myScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, EMM_WIDTH, EMM_HEIGHT)];
    _myScrollView.delegate = self;
    _myScrollView.contentSize = CGSizeMake(0, 1000);
    //设置背景
    _myScrollView.backgroundColor = [UIColor whiteColor];
    //设置是否可以回弹(上下左右)(默认yes)
    _myScrollView.bounces = YES;
    //下面两个设置的是 水平和竖直方向 是否总是有回弹效果(_myScrollView.bounces 必须是YES) 如果没有设置contentSize也能看到回弹效果
//    _myScrollView.alwaysBounceHorizontal = YES;
//    _myScrollView.alwaysBounceVertical = YES;
    //隐藏水平滚动条
    _myScrollView.showsHorizontalScrollIndicator = NO;
    //隐藏垂直滚动条
    _myScrollView.showsVerticalScrollIndicator = NO;
    //设置滚动条的风格
    _myScrollView.indicatorStyle = UIScrollViewIndicatorStyleBlack;
    _myScrollView.scrollEnabled = YES;
    [self.view addSubview:_myScrollView];
    
    _priceResultView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, EMM_WIDTH, 910)];
    _priceResultView.backgroundColor = [UIColor whiteColor];
    [_myScrollView addSubview:_priceResultView];
    
    _titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, EMM_WIDTH, 0)];
    _titleView.backgroundColor = [UIColor colorFromHexCode:@"#f8f8f8"];
    [_priceResultView addSubview:_titleView];
    _titleView.hidden = YES;
    
    _myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, EMM_WIDTH, 910)];
    _myView.backgroundColor = [UIColor whiteColor];
    [_priceResultView addSubview:_myView];
  
    [self creatVie1];
    [self creatVie2];
    [self creatVie3];
    [self creatVie4];
    [self creatVie5];
    [self creatVie6];
    [self creatVie7];
    [self creatVie8];
    [self creatVie9];
    [self creatVie10];
    [self creatVie11];
    [self creatVie12];
    [self creatVie13];
    [self creatVie14];
    [self creatVie15];
    [self creatVie16];
    [self creatVie17];
    [self creatVie18];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (void)creatNavigationController {
    [self updateNavBar];
    self.navigationItem.title = @"算价结果";
    [self configLeftBtn];
    UIBarButtonItem *rightItme = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"ioc_share"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(priceRightClick:)];
    [self.navigationItem setRightBarButtonItem:rightItme];
}

- (void)priceRightClick:(UIButton *)btn {
    [self showHudInWindow:@"请稍等正在加载..."];
    _myScrollView.contentSize = CGSizeMake(0, 1000+50);
    _priceResultView.frame = CGRectMake(0, 0, EMM_WIDTH, 910+50);
    _titleView.frame = CGRectMake(0, 0, EMM_WIDTH, 50);
    _myView.frame = CGRectMake(0, 50, EMM_WIDTH, 910);
    _titleView.hidden = NO;
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, EMM_WIDTH, _titleView.frame.size.height)];
    label.text = @"算价结果";
    label.font = [UIFont systemFontOfSize:16];
    label.textAlignment = NSTextAlignmentCenter;
    [_titleView addSubview:label];
    
//    shotImage = [[ShotImage shareInstance] shotWithView:self.view withScopeRect:CGRectMake(0, 0, _priceResultView.frame.size.width, _priceResultView.frame.size.height)];
    shotImage = [[ShotImage shareInstance] shotWithView:_priceResultView];
    
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
    NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:[NSString stringWithFormat:@"subShare.png"]];   // 保存文件的名称
    BOOL results = [UIImagePNGRepresentation(shotImage)writeToFile:filePath atomically:YES];
    
    [self savePhoto:filePath];
}

-(void)savePhoto:(NSString *)filePath {
    [self hideHud];
    NSURL *url = [NSURL fileURLWithPath:filePath];
    NSArray *objectsToShare = @[url];
    
    UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
    
    NSArray *excludedActivities = @[UIActivityTypePostToTwitter,
                                    UIActivityTypePostToFacebook,
                                    UIActivityTypePostToWeibo,
                                    UIActivityTypeMessage,
                                    UIActivityTypeMail,
                                    UIActivityTypePrint,
                                    UIActivityTypeCopyToPasteboard,
                                    UIActivityTypeAssignToContact,
                                    UIActivityTypeSaveToCameraRoll,
                                    UIActivityTypeAddToReadingList,
                                    UIActivityTypePostToFlickr,
                                    UIActivityTypePostToVimeo,
                                    UIActivityTypePostToTencentWeibo,
                                    UIActivityTypeAirDrop,
                                    UIActivityTypeOpenInIBooks];
    controller.excludedActivityTypes = excludedActivities;
    
    [self presentViewController:controller animated:YES completion:nil];
    UIActivityViewControllerCompletionHandler myblock = ^(NSString *type,BOOL completed){
        NSLog(@"%d %@",completed,type);
        _myScrollView.contentSize = CGSizeMake(0, 1000);
        _priceResultView.frame = CGRectMake(0, 0, EMM_WIDTH, 910);
        _titleView.frame = CGRectMake(0, 0, EMM_WIDTH, 0);
        _myView.frame = CGRectMake(0, 0, EMM_WIDTH, 910);
        _titleView.hidden = YES;
        if (completed == NO) {
            [self showToast:@"取消发送"];
        }else {
            [self showToast:@"成功发送"];
        }
    };
    controller.completionHandler = myblock;
}

#pragma mark - 创建18个View
- (void)creatVie1 {
    
    NSInteger h = [IDTools textHeightFromTextString:[_getHousesDetail.housesName stringByReplacingOccurrencesOfString:@"-->"withString:@"-"]
                                              width:[UIScreen mainScreen].bounds.size.width-150 fontSize:15]+30;
    if (h < 50) {
        oneHgaodu = 50;
    }else {
        oneHgaodu = h;
    }
    
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 10, EMM_WIDTH-30, oneHgaodu)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V3 = [[UIView alloc] initWithFrame:CGRectMake(1, 0, view.frame.size.width-2, 1)];
    V3.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V3];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, view.frame.size.height-2)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, view.frame.size.height)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"房源";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, view.frame.size.height)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getHousesDetail.housesName] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@",[_getHousesDetail.housesName stringByReplacingOccurrencesOfString:@"-->"withString:@"-"]];
    }else {
        titleL.text = [NSString stringWithFormat:@"--"];
    }
}

- (void)creatVie2 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 10 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];

    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"客户姓名";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_khString] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@",_khString];
    }else {
        titleL.text = [NSString stringWithFormat:@"--"];
    }
}

- (void)creatVie3 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 60 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];

    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    //联系电话
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"联系电话";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_phonString] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@",_phonString];
    }else {
        titleL.text = [NSString stringWithFormat:@"--"];
    }
}

- (void)creatVie4 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 110 + oneHgaodu, EMM_WIDTH-30, 60)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *Vi1 = [[UIView alloc] initWithFrame:CGRectMake(0, 5, view.frame.size.width, 50)];
    Vi1.layer.masksToBounds = YES;
    Vi1.layer.borderWidth = 1.0;
    Vi1.layer.borderColor = [[UIColor colorFromHexCode:@"#E4E4E4"] CGColor];
    Vi1.backgroundColor = [UIColor colorFromHexCode:@"#FFF5E9"];
    [view addSubview:Vi1];
    NSDictionary *attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:15],};
    
    CGSize textSize = [@"贷款利率:" boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
    
    CGSize sySize = [@"商业" boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
    
    CGSize gjjSize = [@"公积金" boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(5, 15, textSize.width, 20)];
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:15];
    label.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    [Vi1 addSubview:label];
    label.text = @"贷款利率:";
    
    if ([_loanTypeName isEqualToString:@"组合贷款"]) {
        UILabel *labelSY = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5, 15, sySize.width, 20)];
        labelSY.textAlignment = NSTextAlignmentCenter;
        labelSY.font = [UIFont systemFontOfSize:15];
        labelSY.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
        [Vi1 addSubview:labelSY];
        labelSY.text = @"商业";
        NSString *syString = nil;
        if ([NSString isStringEmpty2:_businessLoanRate] == NO) {
            NSString *s = @"%";
            syString = [NSString stringWithFormat:@"%@%@",_businessLoanRate,s];
        }else {
            syString = @"0%";
        }
        //商业利率
        CGSize syllSize = [syString boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
        UILabel *syllLabel = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5+sySize.width, 15, syllSize.width, 20)];
        syllLabel.textAlignment = NSTextAlignmentCenter;
        syllLabel.font = [UIFont systemFontOfSize:15];
        syllLabel.textColor = [UIColor redColor];
        [Vi1 addSubview:syllLabel];
        syllLabel.text = syString;
        
        //倍数
        NSString *bsString = nil;
        if ([_beishuString floatValue] >= 1.00) {
            bsString = [NSString stringWithFormat:@"(%@倍)",_beishuString];
        }else {
            NSString *string = [NSString getMoney2:[_beishuString floatValue] * 100];
            NSString *strUrl = [string stringByReplacingOccurrencesOfString:@"0" withString:@""];
            bsString = [NSString stringWithFormat:@"(%@折)",strUrl];
        }
        CGSize bsSize = [bsString boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
        UILabel *bsLabel = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5+sySize.width+syllSize.width, 15, bsSize.width, 20)];
        bsLabel.textAlignment = NSTextAlignmentCenter;
        bsLabel.font = [UIFont systemFontOfSize:15];
        bsLabel.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
        [Vi1 addSubview:bsLabel];
        bsLabel.text = bsString;

        //公积金
        UILabel *labelGJJ = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5+sySize.width+syllSize.width+bsSize.width, 15, gjjSize.width, 20)];
        labelGJJ.textAlignment = NSTextAlignmentCenter;
        labelGJJ.font = [UIFont systemFontOfSize:15];
        labelGJJ.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
        [Vi1 addSubview:labelGJJ];
        labelGJJ.text = @"公积金";
        
        NSString *gjjString = nil;
        if ([NSString isStringEmpty2:_fundLoanRate] == NO) {
            NSString *s = @"%";
            gjjString = [NSString stringWithFormat:@"%@%@",_fundLoanRate,s];
        }else {
            gjjString = @"0%";
        }
        CGSize gjjStringSize = [gjjString boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
        
        UILabel *gjjStringLabel = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5+sySize.width+syllSize.width+bsSize.width+gjjSize.width, 15, gjjStringSize.width, 20)];
        gjjStringLabel.textAlignment = NSTextAlignmentCenter;
        gjjStringLabel.font = [UIFont systemFontOfSize:15];
        gjjStringLabel.textColor = [UIColor redColor];
        [Vi1 addSubview:gjjStringLabel];
        gjjStringLabel.text = gjjString;
        
    }else if ([_loanTypeName isEqualToString:@"公积金贷款"]) {
        //公积金
        UILabel *labelGJJ = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5, 15, gjjSize.width, 20)];
        labelGJJ.textAlignment = NSTextAlignmentCenter;
        labelGJJ.font = [UIFont systemFontOfSize:15];
        labelGJJ.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
        [Vi1 addSubview:labelGJJ];
        labelGJJ.text = @"公积金";
        
        NSString *gjjString = nil;
        if ([NSString isStringEmpty2:_fundLoanRate] == NO) {
            NSString *s = @"%";
            gjjString = [NSString stringWithFormat:@"%@%@",_fundLoanRate,s];
        }else {
            gjjString = @"0%";
        }
        CGSize gjjStringSize = [gjjString boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
        
        UILabel *gjjStringLabel = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5+gjjSize.width, 15, gjjStringSize.width, 20)];
        gjjStringLabel.textAlignment = NSTextAlignmentCenter;
        gjjStringLabel.font = [UIFont systemFontOfSize:15];
        gjjStringLabel.textColor = [UIColor redColor];
        [Vi1 addSubview:gjjStringLabel];
        gjjStringLabel.text = gjjString;
        
    }else if ([_loanTypeName isEqualToString:@"商业贷款"]) {
        UILabel *labelSY = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5, 15, sySize.width, 20)];
        labelSY.textAlignment = NSTextAlignmentCenter;
        labelSY.font = [UIFont systemFontOfSize:15];
        labelSY.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
        [Vi1 addSubview:labelSY];
        labelSY.text = @"商业";
        NSString *syString = nil;
        if ([NSString isStringEmpty2:_businessLoanRate] == NO) {
            NSString *s = @"%";
            syString = [NSString stringWithFormat:@"%@%@",_businessLoanRate,s];
        }else {
            syString = @"0%";
        }
        //商业利率
        CGSize syllSize = [syString boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
        UILabel *syllLabel = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5+sySize.width, 15, syllSize.width, 20)];
        syllLabel.textAlignment = NSTextAlignmentCenter;
        syllLabel.font = [UIFont systemFontOfSize:15];
        syllLabel.textColor = [UIColor redColor];
        [Vi1 addSubview:syllLabel];
        syllLabel.text = syString;
        
        //倍数
        NSString *bsString = nil;
        if ([_beishuString floatValue] >= 1.00) {
            bsString = [NSString stringWithFormat:@"(%@倍)",_beishuString];
        }else {
            NSString *string = [NSString getMoney2:[_beishuString floatValue] * 100];
            NSString *strUrl = [string stringByReplacingOccurrencesOfString:@"0" withString:@""];
            bsString = [NSString stringWithFormat:@"(%@折)",strUrl];
        }
        CGSize bsSize = [bsString boundingRectWithSize:CGSizeMake(100, 100) options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil].size;
        UILabel *bsLabel = [[UILabel alloc] initWithFrame:CGRectMake(textSize.width+5+sySize.width+syllSize.width, 15, bsSize.width, 20)];
        bsLabel.textAlignment = NSTextAlignmentCenter;
        bsLabel.font = [UIFont systemFontOfSize:15];
        bsLabel.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
        [Vi1 addSubview:bsLabel];
        bsLabel.text = bsString;
    }
}

- (void)creatVie5 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 170 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 15, view.frame.size.width, 20)];
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:15];
    label.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    [view addSubview:label];
    label.text = @"等额本息还款";
}

- (void)creatVie6 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 220 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V3 = [[UIView alloc] initWithFrame:CGRectMake(1, 0, view.frame.size.width-2, 1)];
    V3.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V3];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    //贷款总额
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"贷款总额";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.loanTotal] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@万元",_getCalculatePrice.loanTotal];
    }else {
        titleL.text = [NSString stringWithFormat:@"万元"];
    }
}

- (void)creatVie7 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 270 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"还款总额";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.repaymentTotal] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@万元",_getCalculatePrice.repaymentTotal];
    }else {
        titleL.text = [NSString stringWithFormat:@"万元"];
    }
}

- (void)creatVie8 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 320 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"支付利息";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.paymentInterest] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@万元",_getCalculatePrice.paymentInterest];
    }else {
        titleL.text = [NSString stringWithFormat:@"万元"];
    }
}

- (void)creatVie9 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 370 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"贷款月数";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.loanMonth] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@月",_getCalculatePrice.loanMonth];
    }else {
        titleL.text = [NSString stringWithFormat:@"月"];
    }
}

- (void)creatVie10 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 420 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"每月还款";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.monthlyRepayment] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@元",_getCalculatePrice.monthlyRepayment];
    }else {
        titleL.text = [NSString stringWithFormat:@"元"];
    }
}

- (void)creatVie11 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 470 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    //等额本金还款
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 15, view.frame.size.width, 20)];
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:15];
    label.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    [view addSubview:label];
    label.text = @"等额本金还款";
}

- (void)creatVie12 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 520 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V3 = [[UIView alloc] initWithFrame:CGRectMake(1, 0, view.frame.size.width-2, 1)];
    V3.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V3];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"贷款总额";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.loanTotal2] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@万元",_getCalculatePrice.loanTotal2];
    }else {
        titleL.text = [NSString stringWithFormat:@"万元"];
    }
}

- (void)creatVie13 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 570 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"还款总额";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.repaymentTotal] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@万元",_getCalculatePrice.repaymentTotal];
    }else {
        titleL.text = [NSString stringWithFormat:@"万元"];
    }
}

- (void)creatVie14 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 620 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"支付利息";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.paymentInterest2] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@万元",_getCalculatePrice.paymentInterest2];
    }else {
        titleL.text = [NSString stringWithFormat:@"万元"];
    }
}

- (void)creatVie15 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 670 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"贷款月数";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];

    if ([NSString isStringEmpty2:_getCalculatePrice.loanMonth2] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@月",_getCalculatePrice.loanMonth2];
    }else {
        titleL.text = [NSString stringWithFormat:@"月"];
    }
}

- (void)creatVie16 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 720 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"首月还款";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    if ([NSString isStringEmpty2:_getCalculatePrice.firstMonthRepayment] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@元",_getCalculatePrice.firstMonthRepayment];
    }else {
        titleL.text = @"元";
    }
}

- (void)creatVie17 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 770 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    UIView *V1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, view.frame.size.height)];
    V1.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V1];
    
    UIView *V2 = [[UIView alloc] initWithFrame:CGRectMake(view.frame.size.width-1, 0, 1, view.frame.size.height)];
    V2.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V2];
    
    UIView *V4 = [[UIView alloc] initWithFrame:CGRectMake(1, view.frame.size.height-1, view.frame.size.width-2, 1)];
    V4.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V4];
    
    UIView *V5 = [[UIView alloc] initWithFrame:CGRectMake(120, 1, 1, 48)];
    V5.backgroundColor = [UIColor colorFromHexCode:@"#EBEBEB"];
    [view addSubview:V5];
    
    UILabel *nameL = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 115, 50)];
    nameL.font = [UIFont systemFontOfSize:15];
    nameL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    nameL.text = @"每月递减";
    nameL.textAlignment = NSTextAlignmentLeft;
    [view addSubview:nameL];
    
    UILabel *titleL = [[UILabel alloc] initWithFrame:CGRectMake(125, 0, view.frame.size.width-130, 50)];
    titleL.font = [UIFont systemFontOfSize:15];
    titleL.textColor = [UIColor colorFromHexCode:@"#1A1A1A"];
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentRight;
    [view addSubview:titleL];
    
    if ([NSString isStringEmpty2:_getCalculatePrice.monthlyDecline] == NO) {
        titleL.text = [NSString stringWithFormat:@"%@元",_getCalculatePrice.monthlyDecline];
    }else {
        titleL.text = [NSString stringWithFormat:@"元"];
    }
}

- (void)creatVie18 {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(15, 820 + oneHgaodu, EMM_WIDTH-30, 50)];
    view.backgroundColor = [UIColor whiteColor];
    [_myView addSubview:view];
    UILabel *labe = [[UILabel alloc] initWithFrame:CGRectMake(0, 15, view.frame.size.width, 20)];
    labe.font = [UIFont systemFontOfSize:15];
    labe.textAlignment = NSTextAlignmentRight;
    labe.text = @"*以上结果仅供参考";
    labe.textColor = [UIColor orangeColor];
    [view addSubview:labe];
}


@end
